<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:c="http://java.sun.com/jstl/core"
	template="/template/template.xhtml">

	<ui:define name="title">Édition de mon profil</ui:define>

	<ui:define name="body">
		<h:form>
			<c:if test="${!empty beansUser.messageErr}">
				<div><h:outputText value="#{beansUser.messageErr}" styleClass="msg error" /></div>
			</c:if>
			<div class="section">
			<br/>			
				<h:outputLabel value="E-mail :" />
				<h:inputText value="#{beansUser.userTemp.email}" styleClass="large"  />
			</div>
			
			<div class="section">
				<p class="minimsg">Si vous voulez garder votre mot de passe actuel, laissez le champ du mot de passe vide.</p>
				<h:outputLabel value="Mot de passe :" />
				<h:inputSecret value="#{beansUser.userTemp.password}" styleClass="large" />
				<h:outputLabel value="Confirmation :" />
				<h:inputSecret  value="#{beansUser.confirmPassword}" styleClass="large" />
			</div>
			
			<div class="section">
				<h:outputLabel value="Prénom :" />
				<h:inputText value="#{beansUser.userTemp.firstname}" styleClass="large" />
				<h:outputLabel value="Nom :" />
				<h:inputText value="#{beansUser.userTemp.lastname}" styleClass="large" />
			</div>
			
			<div class="section">
				<h:outputLabel value="Numéro de portable :" />
				<h:inputText value="#{beansUser.userTemp.mobilphone}" styleClass="large"/>
			</div>
			
			<hr />
			
			<div class="section">
				<h:outputLabel value="Domicile :" />
				<h:inputText value="#{beansUser.userTemp.favoritePositionHome}" styleClass="large"/>
			</div>
			
			<div class="section">
				<h:outputLabel value="Bureau :" />
				<h:inputText value="#{beansUser.userTemp.favoritePositionWork}" styleClass="large"/>
			</div>
			
			<hr />
			
			<div class="section">
				<h:outputLabel value="Genre :" />				
				<h:selectOneRadio value="#{beansUser.userTemp.genre}" styleClass="large">
					<f:selectItem itemLabel="Homme" itemValue="male"/>
					<f:selectItem itemLabel="Femme"  itemValue="female"/>
				</h:selectOneRadio>
			</div>
			
			<div class="section">
				<h:outputLabel value="Tranche d'âge :" />
				<h:selectOneMenu value="#{beansUser.userTemp.birthdateByYear}" styleClass="large">
					<f:selectItem itemLabel="Mineur(e)" itemValue="1992"/>
					<f:selectItem itemLabel="Jeune" itemValue="1980"/>
					<f:selectItem itemLabel="Adulte" itemValue="1960"/>
					<f:selectItem itemLabel="Senior" itemValue="1940"/>
					<f:selectItem itemLabel="Senior++" itemValue="1920"/>
				</h:selectOneMenu>
			</div>
			
			<div class="section">
				<h:outputLabel value="Description :" />
				<h:inputTextarea value="#{beansUser.userTemp.description}" styleClass="large" rows="5"  />	
			</div>	
			
			<hr/>		
			
			<div class="section">
				<h:commandButton action="#{beansUser.changeProfile}" value="Valider les modifications" styleClass="large" />
			</div>
			<div class="section">
				<h:commandButton value="Retour" styleClass="large" action="retour" />		
			</div>
		</h:form>
		
	</ui:define>
	
</ui:composition>